/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package views;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JProgressBar;
import rpg.gameSkeleton.Board;

/**
 *
 * @author Emmanouil Samatas
 */
public class GameBattleBar extends JPanel {

    private JLabel characterName;
    private JLabel enemyName;
    private JButton attackButton;
    private JPanel playerPanel;
    private JPanel monsterPanel;
    private JProgressBar playerHp;
    private JProgressBar enemyHp;
    private JProgressBar playerXp;
    
    public GameBattleBar() {
        setSize(100, 100);
        setLayout(new BorderLayout());
        playerPanel = new JPanel();
        monsterPanel = new JPanel();
        playerPanel.setLayout(new GridLayout(3, 1));
        monsterPanel.setLayout(new GridLayout(3, 1));
        characterName = new JLabel();
        enemyName = new JLabel();
        playerPanel.add(characterName);
        monsterPanel.add(enemyName);
        
        attackButton = new JButton("Attack!");
        attackButton.setEnabled(false);
        
        playerHp = new JProgressBar();
        playerHp.setStringPainted(true);
        playerHp.setForeground(Color.RED);
        
        playerXp = new JProgressBar();
        playerXp.setStringPainted(true);
        playerXp.setForeground(Color.CYAN);
        
        enemyHp = new JProgressBar();
        enemyHp.setStringPainted(true);
        enemyHp.setForeground(Color.RED);
        enemyHp.setVisible(false);
        
        playerPanel.add(playerHp);
        playerPanel.add(playerXp);
        monsterPanel.add(enemyHp);
        add(playerPanel, BorderLayout.WEST);
        add(attackButton, BorderLayout.CENTER);
        add(monsterPanel, BorderLayout.EAST);
    }
    
    public JLabel getPlayerNameLabel() {
        return this.characterName;
    }
    
    public JLabel getEnemyNameLabel() {
        return this.enemyName;
    }
    
    public JProgressBar getPlayerHpBar() {
        return this.playerHp;
    }
    
    public JProgressBar getMonsterHpBar() {
        return this.enemyHp;
    }
    
    public JProgressBar getXpBar(){
        return this.playerXp;
    }
    
    public JButton getAttackButton() {
        return this.attackButton;
    }
   

    public static void main(String[] args) {
        JFrame myFrame = new JFrame();
        myFrame.setVisible(true);

        myFrame.add(new GameBattleBar());
        
    }
}
